﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;

namespace Model.Entities
{
    public class Page
    {

        //[Key]
        //[Column("page_id")]
        //[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int ID { get; set; }

        //[Column("page_title")]
        //[MaxLength(250)]
        public string Title { get; set; }

        //[Column("page_is_public")]
        public bool IsPublic { get; set; }       

        //[Column("site_id")]
        public string Site { get; set; }        

        //[Column("page_keyword")]
        //[MaxLength(500)]
        public string Keyword { get; set; }

        //[Column("page_description")]
        //[MaxLength(500)]
        public string Description { get; set; }

        //[Column("page_parent_id")]
        public int ParentID { get; set; }

        //[Column("page_url")]
        //[MaxLength(500)]
        public string Url { get; set; }

        //[Column("page_language")]
        //[MaxLength(50)]
        public string Language { get; set; }

        //[Column("page_created_date")]
        public DateTime? CreatedDate { get; set; }

        //[Column("page_modified_date")]
        public DateTime? ModifiedDate { get; set; }

        //[Column("page_created_user_id")]
        public int UserID { get; set; }

        public int LogID { get; set; }

        public Theme Theme { get; set; }

        public Page ParentPage { get; set; }

        public virtual ICollection<Module> Modules { get; set; }

        //Get page that their page parent id = this 
        public virtual ICollection<Page> ChildPages { get; set; }

        public virtual ICollection<PageModuleSettings> PageModuleSettings { get; set; }
    }    
}
